<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>LZXリファレンス drawview</title>
  <othercredit role="translator">
    <firstname>Atuo</firstname>
    <surname>Seki</surname>
        <contrib>2006/05/15　翻訳初版</contrib>
 </othercredit>
<link rel="STYLESHEET" type="text/css" href="./styles.css" /></head>
<body>

<!-- ===================================================================== -->
<!-- = XML information goes here                                         = -->
<!-- ===================================================================== -->
<lzelement title="drawv,iew">
    <lztier>LFC</lztier>
    <lzcategory>View</lzcategory>
    <lzshortdesc>
            ドローイングAPIをviewに加えます。
    </lzshortdesc>
    <lztag>tag-drawview.xml</lztag>
    <lzapi>api-lzdrawview.xml</lzapi>
</lzelement>

<p><tagname>drawview</tagname>は<tagname>view</tagname>にドローイングAPIを加えます。</p> 

<p><tagname>Drawview</tagname>は以下のWHATWGドローイングAPIのサブセットを実行できます：
<a href="http://www.whatwg.org/specs/web-apps/current-work/#graphics">http://www.whatwg.org/specs/web-apps/current-work/#graphics</a>
</p>

<example class="code">
&lt;canvas&gt;
    &lt;drawview width="200" height="200"&gt;
        &lt;method event="oninit"&gt;
            this.moveTo(100, 100);
            this.lineTo(100, 200);
            this.quadraticCurveTo(150, 250, 200, 200);
            this.closePath();

            this.fillStyle = 0x0000ff;
            this.globalAlpha = .5;
            this.fill();
            
            this.strokeStyle = 0xffff00;
            this.lineWidth = 5;
            this.stroke();
            
            var g = this.createRadialGradient(75, 75, .7, 300, 300, 0)
            this.globalAlpha = 0;
            g.addColorStop(0, 0x000000);
            this.globalAlpha = 1;
            g.addColorStop(1, 0xffffff);
            this.fillStyle = g;
            this.fill();

            this.strokeStyle = 0x000000;
            this.lineWidth = 0;
            this.stroke();

            this.beginPath();
            this.lineTo(75, 0);
            this.lineTo(75, 75);
            this.lineTo(0, 75);
            this.lineTo(0, 0);
            this.closePath();
            
            var g = this.createLinearGradient(0,0,75,75)
            this.globalAlpha = 0;
            g.addColorStop(0, 0x000000);
            this.globalAlpha = 1;
            g.addColorStop(1, 0xffffff);
            this.fillStyle = g;
            this.fill();
        &lt;/method&gt;
    &lt;/drawview&gt;
&lt;/canvas&gt;
</example>
        
<p><classname>LzDrawView</classname>はLZXの基本的な視覚クラス、
<classname>LzView</classname>を継承しています。</p>

</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
